# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=krdc
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/internet/krdc/"
pkgdesc="Remote Desktop Client"
license="GPL-2.0-or-later AND GFDL-1.2-only"
depends="freerdp"
makedepends="
	extra-cmake-modules
	kbookmarks5-dev
	kcmutils5-dev
	kcompletion5-dev
	kconfig5-dev
	kdnssd5-dev
	kdoctools5-dev
	ki18n5-dev
	kiconthemes5-dev
	knotifications5-dev
	knotifyconfig5-dev
	knotifyconfig5-dev
	kwallet5-dev
	kwidgetsaddons5-dev
	kwindowsystem5-dev
	kxmlgui5-dev
	libssh-dev
	libvncserver-dev
	samurai
	"
_repo_url="https://invent.kde.org/network/krdc.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/krdc-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d6fc4548e1f95e116725e149d13c03ff452ee1b3c7f189520ae41a8279b8852b84d522dd7372757da0ddaa47cd45f545dfdb5dfdc349adc63c1350273c3e3146  krdc-23.08.4.tar.xz
"
